<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>
        <ui:composition template="./../../Template/generalTemplate.xhtml">
            <ui:define name="content">
                <h:form id="form4" prependId="false">
                    <p:panel header="View Raw Material Inventory" style="height:495px;">
                        <div style="margin-left:135px;margin-right:50px;margin-top:40px;">


                            <p:dataTable id="RMinventory" value="#{viewRawMaterialInventoryManagedBean.getRMInventories()}" var="RMinventoryList" scrollable="true" height="300">
                                <p:column  headerText="Raw Material Name" style="width:130px">

                                    <h:outputText value="#{RMinventoryList.rawMaterial.rawMaterialName}" />
                                </p:column>
                              
                                <p:column headerText="Current Inventory Level" style="width:150px">

                                    <h:outputText value="#{RMinventoryList.currentLevel}" />
                                </p:column>
                                <p:column  headerText="Required Safety Stock" style="width:140px">

                                    <h:outputText value="#{RMinventoryList.safetyStock}" />
                                </p:column>
                                </p:dataTable>
                       <p:commandButton update="form4"   value="Everyday Update" actionListener="#{viewRawMaterialInventoryManagedBean.everydayDecreaseOfCurrentInventory}" />



                            
                            <br />


                        </div>
                    </p:panel>

                </h:form>

            </ui:define>

        </ui:composition>



    </body>
</html>
